package mt.teste;

import static org.junit.Assert.assertEquals;

import mt.Order;
import mt.comm.ServerSideMessage.Type;
import mt.dummy.ServerSideMessageDummy;

import org.junit.Test;

public class TesteServerSideMessageDummy {
	
	
	@Test
	
	public void TestServerSideMessage(){
		
		Order orderBuy = Order.createBuyOrder("TesteBuy", "BES", 100, 1);

		ServerSideMessageDummy msg = new ServerSideMessageDummy(Type.NEW_ORDER, "Test", orderBuy);
		ServerSideMessageDummy msg1 = new ServerSideMessageDummy(Type.CONNECTED, "Test", null);
		ServerSideMessageDummy msg2 = new ServerSideMessageDummy(Type.DISCONNECTED, "Test", null);
		
		assertEquals(msg.getOrder(),orderBuy);
		assertEquals(msg.getSenderNickname(),"Test");
		assertEquals(msg.getType(),Type.NEW_ORDER);
		
		
		
	}

}
